<template>
	<view class="w100 bg-white pb-30" style="border-radius: 10rpx 10rpx 0 0;">
		<view style="height: 60rpx;"></view>
		<view style="font-size: 36rpx;
font-family: Microsoft YaHei;
font-weight: bold;
color: #333333;" class="text-center">
			确认路线
		</view>
		<view style="height: 70rpx;"></view>
		<!-- <view class="ptb-15 plr-36 flex img" style="background: #eee;">
			<view class="size-26 blue">
				本行程可能经过收费路段，若产生高速费需另行支付
			</view>
			<image src="../../static/warning-icon.png" mode=""></image>
		</view> -->
		<view class="text-center">
			预计<text class="price">{{price}}19</text>元
		</view>
		<!-- <view class="mt-20 text-center gray-2">
			券已抵扣<text>14</text>元
		</view> -->
		
		<view style="height: 40rpx;"></view>
		<view class="plr-36 mt-40 flex_l size-26">
			<u-radio-group v-model="value" active-color="#014495" @change="radioGroupChange">
				<u-radio name="1" :label-disabled="false"></u-radio>
			</u-radio-group>
			<view class="ml-20">
				我已阅读并同意
				<text class="green" @click="goDetails(19,'代驾服务协议')">《代驾服务协议》</text>
				<text class="green" @click="goDetails(20,'计价规则')">《计价规则》</text>
			</view>
		</view>
		<view style="height: 50rpx;"></view>
		<!-- <view class="mlr-36 mt-30 bg-blue white text-center size-32 u-btn--primary" style="height: 96rpx;line-height: 96rpx;" @click="submit"> -->
		<view class="mt-30 bg-blue white text-center size-32 u-btn--primary" style="height: 96rpx;line-height: 96rpx;"
			@click="submit">
			呼叫代驾
		</view>
	</view>
</template>

<script>
	export default {
		props: ['price'],
		data() {
			return {
				value: 0
			}
		},
		methods: {
			radioGroupChange(e) {
				console.log(e);
			},
			goDetails(id, title) {
				uni.navigateTo({
					url: '/pages/my/details?id=' + id + '&title=' + title
				})
			},
			submit() {
				if(this.value == 0){
					uni.showToast({
						title: '请勾选代驾服务协议',
						icon: 'none'
					})
				} else {
					this.$emit('hujiao')
				}
			}
		}
	}
</script>

<style lang="scss">
	/deep/.u-primary-hover {
		background-color: $blue !important;
	}

	/deep/.u-radio {
		display: flex;
		flex-direction: row-reverse;
	}

	/deep/.u-radio__label {
		margin-left: 0;
		margin-right: 0;
	}

	.img {
		image {
			width: 40rpx;
			height: 40rpx;
		}
	}
	
	.price {
		font-weight: Bold;
		font-size: 50rpx;
		color: #FF2626;
	}
</style>
